package com.example.order.pojo;

import android.support.annotation.NonNull;

import java.io.Serializable;
import java.sql.Timestamp;

public class Order  implements Serializable {
    Integer id;
    Integer customer_id;//顾客ID
    Double price;//总价
    Timestamp time;//订单创建时间
    Integer desk_id;//就餐桌子代号
    Integer state;//订单状态

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getCustomer_id() {
        return customer_id;
    }

    public void setCustomer_id(Integer customer_id) {
        this.customer_id = customer_id;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Timestamp getTime() {
        return time;
    }

    public void setTime(Timestamp time) {
        this.time = time;
    }

    public Integer getDesk_id() {
        return desk_id;
    }

    public void setDesk_id(Integer desk_id) {
        this.desk_id = desk_id;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public String toString() {

        String str;
        if(this.getState()==1)
            str=" 已支付";
        else    str=" 未支付";

        return
                "订单:"+id+
                "顾客:" + customer_id +
                "总消费:" + price +
                "桌号" + desk_id +
                str;
    }
}
